$url:'//s.dyrs.cc/static/pc/images/';
//transition
@mixin tran($a:all, $b:ease, $c:.3s,$d:0s) {
    transition: $a $b $c $d;
    -moz-transition: $a $b $c $d;
    -webkit-transition:$a $b $c $d;
}

//animation
@mixin animation($a){
	animation:$a;
    -moz-animation:$a;
    -webkit-animation:$a;

}
//border
@mixin radius($a){
    width: $a;
	height: $a;
    border-radius: 50%;
}
//transform
@mixin transform($a) {
    transform: $a;
    -moz-transform: $a;
    -webkit-transform: $a;
    -ms-transform: $a;
}

//opacity
@mixin opacity($a) {
    opacity: $a;
    filter:alpha(opacity=$a*100);
}

@mixin line_over($num:2) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $num;
}
@mixin line_over_auto($num:2, $f:14, $l:1.5) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $num;
    line-height:$l;
    font-size:$f+px;
    max-height: $f*$l*$num+px;
}

@mixin center($w){
    width:$w+px;
    position: absolute;
    left:50%;
    margin-left:-$w/2+px;

}
@mixin h_middle($a){
    height:$a;
    line-height: $a;
}
@mixin circle($a){
    width:$a;
    height:$a;
    border-radius: 50%;
}
@mixin fang($a){
    width:$a;
    height:$a;
}
@mixin fang_c($a){
    width:$a;
    height:$a;
    line-height: $a;
    text-align: center;
}
@mixin circle_m($a){
    width:$a;
    height:$a;
    border-radius: 50%;
    text-align: center;
    line-height: $a;
}
@mixin gradient($a,$b){
  background:#000; /* 一些不支持背景渐变的浏览器 */
  background:-moz-linear-gradient(top, $a, $b);
  background:-webkit-gradient(linear, 0 0, 0 bottom, from($a), to($b));
  background:-o-linear-gradient(top, $a, $b);
}
@mixin shadow($type) {
    @if $type == 'dark' {
        -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        -ms-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        -o-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    @if $type == 'lighting' {
        -webkit-box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        -moz-box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        -ms-box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        -o-box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }
}
